package threads;

import java.util.concurrent.RejectedExecutionException;

/**
 * Package: threads
 * Description： 实现自己拒绝策略
 * Author: Forest
 * Date: Created in 2021/4/8 14:08
 * Version: 0.0.1
 * Modified By: duforest
 */
public class MyUncaughtExceptionHandle implements Thread.UncaughtExceptionHandler {
    @Override
    public void uncaughtException(Thread t, Throwable e) {
        System.out.println("thread name=" + t.getName() + ",DIY error" + e);
        throw new RejectedExecutionException();
    }
}
